/**
 * 所有组件优化的全部放这里面
 * 这里是为了组件优化提高浏览器性能特意抽离出来的组件
 * 包含公共组件、业务组件
 * branchName: f-echart-qixiaofei
 * time: 2020/06/16
 * */

/**
 * 业务组件
 * */
const component = Object.create(null)
component.install = function (vue) {
  //用到业务的组件
  const echarts_header = r => require.ensure([], () => r(require('@/components/common/echarts/echarts_header')), 'echarts_header')
  const Statistics = r => require.ensure([], () => r(require('@/components/common/echarts/Statistics')), 'Statistics')
  const blockContent = r => require.ensure([], () => r(require('@/components/common/echarts/blockContent')), 'blockContent')
  const selectOption = r => require.ensure([], () => r(require('@/components/common/echarts/selectOption')), 'selectOption')
  // 地图
  const Map = r => require.ensure([], () => r(require('@/components/common/echarts/Map.vue')), 'Map')
  // 学历
  const XLSelect = r => require.ensure([], () => r(require('@/components/common/selectComponents/XLSelect.vue')), 'XLSelect')
  // 区县
  const QXSelect = r => require.ensure([], () => r(require('@/components/common/selectComponents/QXSelect.vue')), 'QXSelect')
  // 行业
  const HYSelect = r => require.ensure([], () => r(require('@/components/common/selectComponents/HYSelect.vue')), 'HYSelect')
  // 性质
  const XZSelect = r => require.ensure([], () => r(require('@/components/common/selectComponents/XZSelect.vue')), 'XZSelect')
  // 规模
  const GMSelect = r => require.ensure([], () => r(require('@/components/common/selectComponents/GMSelect.vue')), 'GMSelect')
  // 注册全局组件
  vue.component('echartsHeader', echarts_header)
  vue.component('Statistics', Statistics)
  vue.component('blockContent', blockContent)
  vue.component('selectOption', selectOption)
  vue.component('Map', Map);
  vue.component('XLSelect', XLSelect);
  vue.component('QXSelect', QXSelect);
  vue.component('HYSelect', HYSelect);
  vue.component('XZSelect', XZSelect);
  vue.component('GMSelect', GMSelect);
}

// 导出组件
export default component